<?php
namespace app\home\controller;

use app\common\controller\HomeBase;  // model
use think\Db;                       // db
use app\common\model\Products as ProductsModel;

class Products extends HomeBase
{

    /*
     *
     * */


    public function index($id)
    {

        $article = new ProductsModel();
        $result = $article->showOneArticle($id);

        $title_array = array(
            'title'     => '产品'
        );
        $this->assign('title',$title_array);
        $this->assign('results',$result);
        return $this->fetch();
    }
}
